#ifndef _THREAD_H_
#define _THREAD_H_

#include <functional>
#include <pthread.h>

using std::function;

class Thread
{
    typedef std::function<void()> TFunc;
    public:
        Thread(const TFunc& func);
        ~Thread();

        void start();
        void join();

        static void* threadFunc(void* pArg);

    private:
        pthread_t _pthID;
        bool _isRunning;
        TFunc _tCallBack;

};

#endif
